package com.demo.controller;

import com.demo.model.User;
import org.springframework.context.annotation.Bean;
import org.springframework.stereotype.Component;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: Admin
 * Date: 2023-02-08
 * Time: 19:00
 */

@Component
public class UserBeans {

    @Bean
    public User user2() {

        User user = new User();
        user.setId(2);
        user.setName("UserBeans:李四");
        user.setAge(20);

        return user;
    }

}
